package com.example.service.impl;

import com.example.model.auto.NewsAccount;
import com.example.model.auto.NewsInfo;
import com.example.mapper.auto.NewsInfoMapper;
import com.example.service.INewsInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 新闻热点信息表 服务实现类
 * </p>
 *
 * @author 达瓦里氏
 * @since 2021-12-03
 */
@Service
public class NewsInfoServiceImpl extends ServiceImpl<NewsInfoMapper, NewsInfo> implements INewsInfoService {

    @Resource
    private NewsInfoMapper newsInfoMapper;

    @Override
    public List<NewsAccount> selectNews() {
        return newsInfoMapper.selectNews();
    }

    @Override
    public List<NewsAccount> selectNewsById(int id) {
        return newsInfoMapper.selectNewsById(id);
    }
}
